//
//  Camera.h
//  CIRectangleDetectDemo
//
//  Created by fujikoli(李鑫) on 2017/8/29.
//  Copyright © 2017年 fujikoli(李鑫). All rights reserved.
//

#import <AVFoundation/AVFoundation.h>

@interface Camera : NSObject

@property (strong, nonatomic) AVCaptureDevice *device;
@property (strong, nonatomic) AVCaptureVideoPreviewLayer *previewLayer;
@property (strong, nonatomic) AVCaptureSession *captureSession;
@property (strong, nonatomic) AVCaptureVideoDataOutput *output;
@property (nonatomic, strong) AVCapturePhotoOutput *imageOutput;//拍照时使用
@property (strong, nonatomic) UIImage *stillImage;

-(void)actionWithBufferDelegate:(nullable id<AVCaptureVideoDataOutputSampleBufferDelegate>)delegate previewLayerFrame:(CGRect)frame;
///聚焦
-(void)focusAt:(CGSize)size point:(CGPoint)point;
///开始扫描
-(BOOL)startRunning;
///停止扫描
-(void)captureStopRunning;
- (void)takePictureWith:(id<AVCapturePhotoCaptureDelegate>)delegate;

@end

